﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using MYData.Entity.DomainModels.ApiEntity.detail;

namespace MYData.Entity.DomainModels.ApiEntity.Input
{
    public class BasicinfoorAppendixInput_Dto
    {
        /// <summary>
        ///申报人
        /// </summary>
        [Display(Name = "申报人")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string declarantName { get; set; }

        /// <summary>
        ///申报人工号
        /// </summary>
        [Display(Name = "申报人工号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string declarantID { get; set; }

        /// <summary>
        ///申报人出生年月
        /// </summary>
        [Display(Name = "申报人出生年月")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime declarantBirthday { get; set; }

        /// <summary>
        ///申报人手机号
        /// </summary>
        [Display(Name = "申报人手机号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string declarantTel { get; set; }

        /// <summary>
        ///申报人身份证号
        /// </summary>
        [Display(Name = "申报人身份证号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string declarantCard { get; set; }

        /// <summary>
        ///填报人
        /// </summary>
        [Display(Name = "填报人")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string userName { get; set; }

        /// <summary>
        ///填报人联系方式
        /// </summary>
        [Display(Name = "填报人联系方式")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string userFormat { get; set; }

        /// <summary>
        ///申报人所属部门ID（雪花ID）
        /// </summary>
        [Display(Name = "申报人所属部门ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string departmentID { get; set; }

        /// <summary>
        ///成果所属部门ID（雪花ID）
        /// </summary>
        [Display(Name = "成果所属部门ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string achievementID { get; set; }

        /// <summary>
        ///学科门类ID（雪花ID）
        /// </summary>
        [Display(Name = "学科门类ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string disciplineID { get; set; }

        /// <summary>
        ///项目级别ID（雪花ID）
        /// </summary>
        [Display(Name = "项目级别ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string levelID { get; set; }

        /// <summary>
        ///来源单位
        /// </summary>
        [Display(Name = "来源单位")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string sourceName { get; set; }

        /// <summary>
        ///项目类别ID（雪花ID）
        /// </summary>
        [Display(Name = "项目类别ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string categoryID { get; set; }

        /// <summary>
        ///申报时间
        /// </summary>
        [Display(Name = "申报时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime declarationTime { get; set; } 

        /// <summary>
        ///申请经费
        /// </summary>
        [Display(Name = "申请经费")]
        [DisplayFormat(DataFormatString = "10,2")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public decimal expenditureMoney { get; set; }

        /// <summary>
        ///项目开始时间
        /// </summary>
        [Display(Name = "项目开始时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime beginTime { get; set; } 

        /// <summary>
        ///项目结束时间
        /// </summary>
        [Display(Name = "项目结束时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime endTime { get; set; }

        /// <summary>
        ///项目摘要
        /// </summary>
        [Display(Name = "项目摘要")]
        [MaxLength(500)]
        [Column(TypeName = "nvarchar(500)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectAbstract { get; set; }

        /// <summary>
        ///是否涉及医学伦理
        /// </summary>
        [Display(Name = "是否涉及医学伦理")]
        [Column(TypeName = "bool")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public bool medicalEthics { get; set; }

        /// <summary>
        ///涉及医学伦理详情（是，填写涉及详细信息，否，为空）
        /// </summary>
        [Display(Name = "涉及医学伦理详情（是，填写涉及详细信息，否，为空）")]
        [MaxLength(500)]
        [Column(TypeName = "nvarchar(500)")]
        [Editable(true)]
        public string medicalDetails { get; set; }

        /// <summary>
        ///是否涉及动物伦理
        /// </summary>
        [Display(Name = "是否涉及动物伦理")]
        [Column(TypeName = "bool")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public bool animalEthics { get; set; }

        /// <summary>
        ///涉及动物伦理详情（是，填写涉及详细信息，否，为空）
        /// </summary>
        [Display(Name = "涉及动物伦理详情（是，填写涉及详细信息，否，为空）")]
        [MaxLength(500)]
        [Column(TypeName = "nvarchar(500)")]
        [Editable(true)]
        public string animalDetails { get; set; }

        /// <summary>
        ///项目名称
        /// </summary>
        [Display(Name = "项目名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Required(AllowEmptyStrings = false)]
        public string projectName { get; set; }

        /// <summary>
        ///项目类型ID（雪花ID）
        /// </summary>
        [Display(Name = "项目类型ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Required(AllowEmptyStrings = false)]
        public string dic_Id { get; set; }

        /// <summary>
        ///通知附件ID（雪花ID）
        /// </summary>
        [Display(Name = "通知附件ID（雪花ID）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Required(AllowEmptyStrings = false)]
        public string attachmentId { get; set; } 

        /// <summary>
        ///是否删除
        /// </summary>
        [Display(Name = "是否删除")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int isDelete { get; set; } = 0;

        public tb_project_appendixInput_Dto data { get; set; } 
    }
    public class tb_project_appendixInput_Dto
    {
        /// <summary>
        ///申报附件表名称
        /// </summary>
        [Display(Name = "申报附件表名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string appendixName { get; set; }

        /// <summary>
        ///申报基础信息表外键
        /// </summary>
        [Display(Name = "申报基础信息表外键")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectID { get; set; }

        /// <summary>
        ///附件路径
        /// </summary>
        [Display(Name = "附件路径")]
        [Column(TypeName = "nvarchar(max)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string appendixUrl { get; set; }

        /// <summary>
        ///附件大小
        /// </summary>
        [Display(Name = "附件大小")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        public string appendixSize { get; set; }

        /// <summary>
        ///附件格式(类型支持jpg、 png、doc、 docx、 pdf、 xls、 xlsx、 xt)
        /// </summary>
        [Display(Name = "附件格式(类型支持jpg、 png、doc、 docx、 pdf、 xls、 xlsx、 xt)")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        public string appendixForm { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        public string creator { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime creatorDate { get; set; }= DateTime.Now;

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        public string modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? modifierTime { get; set; }= DateTime.Now;

        /// <summary>
        ///是否删除
        /// </summary>
        [Display(Name = "是否删除")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int isDelete { get; set; } = 0;
    }
}
